<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

$this->pageTitle=Yii::app()->name . ' - Login';
?>

<div class="login-container">
	<h1 class="logo"><img src="<?php echo Yii::app()->theme->baseUrl ?>	/img/logo.png" alt="<?php echo CHtml::encode(Yii::app()->name); ?>" /> <?php echo Yii::app()->name ?></h1>
	
	<div class="box span4"><div class="content">
		<h3 class="form-title"><?php echo Yii::t('app', 'Sign In to your Account') ?></h3>
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'login-form',
			'enableClientValidation' => true,
			'clientOptions'=> array('validateOnSubmit'=>true),
		)); ?>
			<?php if($model->hasErrors()): ?>
			<div class="control-group">
				<?php echo $form->errorSummary($model); ?>
			</div>
			<?php endif ?>

			<div class="control-group">
				<p><?php echo $form->labelEx($model,'username') ?><em style="float: left; margin: -25px 0px 0px 100px;">(admin)</em></p>
				<?php echo $form->textField($model,'username',array('class'=>'span3','maxlength'=>30)); ?>
				<?php echo $form->error($model,'username'); ?>
			</div>
			
			<div class="control-group">
				<p><?php echo $form->labelEx($model,'password') ?><em style="float: left; margin: -25px 0px 0px 100px;">(admin)</em></p>
				<?php echo $form->passwordField($model,'password',array('class'=>'span3')); ?>
				<?php echo $form->error($model,'password'); ?>
			</div>
			
			<div class="control-group clearfix">
				<div class="remember pull-left">
					<?php echo $form->checkBox($model,'rememberMe'); ?>
					<?php echo $form->label($model,'rememberMe'); ?>
				</div>
				<button type="submit" class="btn btn-primary pull-right"><?php echo Yii::t('app', 'Login') ?></button>
			</div>
		<?php $this->endWidget(); ?>
	</div></div>
</div>
<script>
//<![CDATA[
$(window).load(function () {
	$('#LoginForm_username').focus();
});
//]]>
</script>